import request from '@/utils/request'

const apiUrl = '/api/maintenance'

// 获取工务维修申请单分页列表
export function getMaintenanceFormPage(current, size, applyDepartment, applicant) {
    return request({
        url: `${apiUrl}/page`,
        method: 'get',
        params: {
            current,
            size,
            applyDepartment,
            applicant
        }
    })
}

// 保存工务维修申请单
export function saveMaintenanceForm(data) {
    return request({
        url: `${apiUrl}/save`,
        method: 'post',
        data
    })
}

// 根据ID获取工务维修申请单
export function getMaintenanceFormById(id) {
    return request({
        url: `${apiUrl}/${id}`,
        method: 'get'
    })
}

// 删除工务维修申请单
export function deleteMaintenanceForm(id) {
    return request({
        url: `${apiUrl}/${id}`,
        method: 'delete'
    })
} 